/**
 * 
 */
package cx3k.GUI;

import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;

/**
 * @author Chris
 *
 */
public class SearchPane extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private SearchOptionsPane opsPane;
	private SearchResultsPane results;
	
	public SearchPane() {
		GridBagLayout gbl = new GridBagLayout();
		this.setLayout(gbl);
		GridBagConstraints gbc = new GridBagConstraints();
		this.setBackground(MainWindow.MAINCOLOR);
		this.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
		
		JLabel jlSearch = new JLabel("Search");
		gbc.gridx = 0;
		gbc.gridy = 0; 
		gbc.gridwidth = 1; 
		gbc.gridheight = 1; 
		gbc.weightx = 100; 
		gbc.weighty = 2; 
		gbc.fill = GridBagConstraints.NONE; 
		gbc.anchor = GridBagConstraints.CENTER;
		gbl.setConstraints(jlSearch, gbc);
		this.add(jlSearch); 
		
		
		opsPane = new SearchOptionsPane();
		gbc.gridx = 0;
		gbc.gridy = 1; 
		gbc.gridwidth = 1; 
		gbc.gridheight = 1; 
		gbc.weightx = 100; 
		gbc.weighty = 8; 
		gbc.fill = GridBagConstraints.HORIZONTAL; 
		gbc.anchor = GridBagConstraints.LINE_START; 
		gbl.setConstraints(opsPane, gbc);
		this.add(opsPane);
		
		results = new SearchResultsPane();
		JScrollPane scrollResults = new JScrollPane(results);
		gbc.gridx = 0;
		gbc.gridy = 2; 
		gbc.gridwidth = 1; 
		gbc.gridheight = 1; 
		gbc.weightx = 100; 
		gbc.weighty = 90; 
		gbc.fill = GridBagConstraints.BOTH; 
		gbc.anchor = GridBagConstraints.LINE_START; 
		gbl.setConstraints(scrollResults, gbc);
		this.add(scrollResults);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
